<%-- 
    Document   : BNacimiento
    Created on : 19-sep-2013, 9:56:59
    Author     : WALDIR
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" type="text/css" href="/RegCivil/css/estilos.css">
        <link rel="stylesheet" type="text/css" href="/RegCivil/datepicker/css/cupertino/jquery-ui-1.10.3.custom.min.css"/>
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-ui-1.10.3.custom.min.js"></script>
        <script type="text/javascript" src="/RegCivil/calendario/calendario.js"></script>

        <script type="text/javascript">
            if (window.ActiveXObject) {
                var obj = new ActiveXObject("Microsoft.XMLHTTP");
            }
            if (window.XMLHttpRequest){ 
                var obj = new XMLHttpRequest();
            }
            
            function buscar()
            {
                var nl=document.getElementById("nlib").value;
                var na=document.getElementById("nact").value;
                var ncui=document.getElementById("ncui").value;
                var ubi=document.getElementById("ubi").value;
                var bt=document.getElementById("boton").value;
                var txt="btn1="+bt+"&nrolibro="+nl+"&nroacta="+na+"&cui="+ncui+"&ubigeo="+ubi;
                obj.onreadystatechange=res_bus;
                obj.open("post","${pageContext.request.contextPath}/MantenimientoNacimiento", true)
                obj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
                obj.send(txt);
            }
            function res_bus(){
                if(obj.readyState == 4)
                {
                    var x=obj.responseText;
                    $("#RSBus").html(x);
                } 
            }
            function filtrar()
            {
                var x=document.getElementById("VBus").value;
                if(x=="libro")
                {
                    document.getElementById("boton").setAttribute("value","BusLib");
                }
                if(x=="acta")
                {
                    document.getElementById("boton").setAttribute("value","BusAct");
                }
                if(x=="cui")
                {
                     document.getElementById("boton").setAttribute("value","BusCUI");
                }
                if(x=="idubi")
                {
                    document.getElementById("boton").setAttribute("value","BusIdUbi");
                }
            }
        </script>
    </head>
    <body>
        <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;width: 880px;text-align: center;" class="contacto">
            <tr><td>                    
                    <fieldset style="alignment-baseline: central;margin-left: auto;margin-right: auto;" >
                        <legend style="border: 1px solid #dce0e3;background-color: #edf1f5">
                            BUSQUEDA DE NACIMIENTO</legend>
                        <table border="0">
                            <tr>
                                <td>
                                    <fieldset style="width:800px;margin-left: auto;margin-right: auto;"><legend><label/>REGISTRO PERSONAL</legend>
                                        <table border="0">
                                            <tr>
                                                <td><label style="width:150px;text-align: right;padding-right: 10px;"/>Forma De Buqueda </td>
                                                <td><select name="bus"  id="VBus" style="padding: 7px 6px;
                                                            width: 200px;
                                                            border: 1px solid #CED5D7;
                                                            resize: none;
                                                            box-shadow:0 0 0 3px #EEF5F7;
                                                            margin: 5px 0;
                                                            text-transform: uppercase;" onchange="filtrar();">
                                                        <option value="libro">Nro Libro</option>
                                                        <option value="acta">Nro Acta Pers</option>
                                                        <option value="cui">CUI Pers</option>
                                                        <option value="idubi">ID Ubigeo</option>
                                                    </select>
                                                </td>
                                                <td><label style="width:150px;text-align: right;padding-right: 10px;"/>Ingrese CUI  </td>
                                                <td><input type='text' name='NCUI' id='ncui' style='width:180px;'></td>
                                            </tr>
                                            <tr>
                                                <td><label style="width:150px;text-align: right;padding-right: 10px;" />Ingrese Nro Libro </td>
                                                <td><input type='text' name='NLibro' id='nlib' style='width:180px;'></td>
                                                <td><label style="width:150px;text-align: right;padding-right: 10px;"/>Ingrese Nro Acta </td>
                                                <td><input type='text' name='NActa' id='nact'  style='width:180px;'></td>
                                            </tr>
                                            <tr>
                                                <td><label style="width:150px;text-align: right;padding-right: 10px;"/>Ingrese ID Ubigeo  </td><td><input type='text' name='ubigeo' id='ubi'   style='width:180px;'></td>
                                            </tr>
                                            <tr >
                                                <td colspan="4" style="text-align: center;"><button type="button" name="btn1" id="boton" value="BusCUI"  class="boton" style="width: 500px;" onclick="buscar()">Bucar</button></td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </table>
        <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;width: 700px; " class="contacto" >
            <tr>
                <td>
                    <fieldset id="RSBus">
                        
                    </fieldset>
                </td>
            </tr>
        </table>          

    </body>
</html>
